import $ from 'jquery';
import ShopCart from './ShopCart/ShopCart'
import ShopList from './ShopList/ShopList'

export default class App {
  constructor(id) {
    this.$el = $('#' + id)
  }

  // 初始化购物车
  initShopCart() {
    const shopCart = new ShopCart(this);
    shopCart.init();
  }

  // 初始化列表
  initShopList() {
    const shopList = new ShopList(this);
    shopList.init();
  }

  init() {
    this.initShopCart();
    this.initShopList();
  }
}